﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;

namespace shop.Model
{
    /// <summary> 代发运费按数量 </summary>
    public class DaifaQtyPost
    {
        [Column(IsIdentity = true, IsPrimary = true)]
        public int id { set; get; }

        public DateTime? BeginDate { set; get; }

        public DateTime? EndDate { set; get; }


        /// <summary> 仓库 </summary>
        [Column(StringLength = 100)]
        public string Stock { set; get; }

        /// <summary> 省份 </summary>
        [Column(StringLength = 500)]
        public string Province { set; get; }


        /// <summary> 商家编码 </summary>
        [Column(StringLength = 4000)]
        public string spec_no { set; get; }


        ///// <summary> 数量 </summary>
        //public int Qty { set; get; }


        ///// <summary> 快递费单价 </summary>
        //[Column(Precision = 18, Scale = 4)]
        //public decimal PostPrice { set; get; }

        /// <summary> 价格区间 </summary>
        [Column(StringLength =4000)]
        public string RangePriceJson {  set; get; } 


        public bool isdel { set; get; }

        /// <summary> 制单人 </summary>
        [Column(StringLength = 30)]
        public string FUser { set; get; }

        /// <summary> 时间 </summary>
        public DateTime FTime { set; get; }


        [Column(StringLength =100)]
        public string batch { get; set; }

        //public virtual DaifaQtyPost Clone()
        //{
        //    return this.MemberwiseClone() as DaifaQtyPost;
        //}
    }


    public class DaifaQtyPostDto: DaifaQtyPost
    {

        public List<QtyPriceRange> PriceList { set; get; }

        /// <summary>  </summary>
        public string PriceDto { set; get; }



        public DaifaQtyPostDto Clone()
        {
            return this.MemberwiseClone() as DaifaQtyPostDto;
        }
    }



    /// <summary> 区间 </summary>
    public class QtyPriceRange
    {
        public int Qty { get; set; }
        public decimal Price { get; set; }
    }




}
